<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <style>
        /*兼容IE*/
        .clearfix {
            *zoom: 1;
        }
        .clearfix:after {
            content: "";
            display: block;
            clear: both;
        }
        .box {
            border: 1px solid red;
        }
        .item {
            width: 200px;
            height: 200px;
            background-color: red;
            float: left;
        }
    </style>
    <title>clear3</title>
</head>
<body>
    <div class="box clearfix">
        <div class="item"></div>
    </div>
</body>
</html>